﻿<!DOCTYPE html>
<html>
<head>
    <meta charset="UTF-8">
    <title>コントロールパネル</title>
    <link href="./assets/styles/default.css" rel="stylesheet" />
    <script src="./assets/scripts/libs/jquery-1.7.1.min.js" type="text/javascript"></script>
    <script src="./assets/scripts/import.js" type="text/javascript"></script>
    <style>
        .tLeft
        {
            clear: both;
            float: left;
            width: 48%;
        }
        .tRight
        {
            float: right;
            width: 48%;
        }
        h5
        {
            padding: 10px;
            margin: 0;
            text-align: left;
            background-color: #f5f5f5;
            border-bottom: 3px double #e5e5e5;
            font-size: 14px;
        }
        #totalTable th
        {
            text-align: right !important;
        }
    </style>
    <script type="text/javascript">
        //	    function check(tableid) {
        //	        var ret = true;
        //	        //checkdate
        //	        if (tableid == "t5") {
        //	            $("#" + tableid + " input[chk='date']").each(
        //					function (i, el) {
        //					    if (!isDate($(this).val())) {
        //					        alert("YYYY-MM-DD HH:mm:ss で入力してください");
        //					        $(this).focus(); ret = false; return false;
        //					    }
        //					}
        //			);
        //	        }
        //	        return ret;
        //	    }

        //	    function isDate(value) {
        //	        var ereg = /^(\d{1,4})(-|\/)(\d{1,2})(-|\/)(\d{1,2}) {1,10}(0\d{1}|1\d{1}|2[0-3]):[0-5]\d{1}:([0-5]\d{1})$/;
        //	        var r = value.match(ereg);
        //	        if (r == null) {
        //	            return false;
        //	        }
        //	        var d = new Date(r[1], r[3] - 1, r[5]);
        //	        var result = (d.getFullYear() == r[1] && (d.getMonth() + 1) == r[3] && d.getDate() == r[5]);
        //	        return result;
        //	    }

        //	    $(function () {
        //	        $('#btn_update').unbind().click(function (e) {
        //	            if (!check('t5')) { return false; };
        //	            customConfirm('更新してよろしいですか？', "", $(this), function () {
        //	                loading();
        //	                //pushID();
        //	                //$('input[name=mode]', form).val('input');
        //	                $('form').submit();
        //	            });

        //	        });
        //	    });
    </script>
</head>
<body>
    {{$zhead}}
    <div id="container">
        {{$zmenu}}
        <center>
            <span style="color: red;">{{$errmsg}}</span></center>
        <article>
    	<h2><span>&nbsp;</span>注文管理<p><a href="javascript:;">Open Plugins</a></p></h2>
        <nav>
        	<ul>
				<li class="active"><a href="Home_OrderManage_index.html"><span>履歴検索</span></a></li>
				<li><a href="Home_order_summary.html"><span>売上集計</span></a></li>
				<li><a href="Home_order_setting.html"><span>基本設定</span></a></li>
			</ul>
        </nav>
		<section id="content">
			<h3>注文情報参照</h3>
			<ul class="clear btns float-right t10 b10" style="position:relative;top: 5px;right: -15px;">
				<li class="btn single c"><a href="{{$backurl}}" >戻る</a></li>
			</ul>
			<form name="fm" id="fm" action="{{'Home/OrderRefer/updatesended'|U}}{{$mutiflag}}" method="post" enctype="multipart/form-data" class="clear" >
			<input name="order_id" type="hidden" value="{{$orderids}}">
              {{foreach  from=$orderrow item=orderindex}}
				<h4>
					<span>&nbsp;</span>
					注文No.{{$orderindex.order_number}}
					&nbsp;&nbsp;
					{{$orderindex.order_time|date_format:"%Y/%m/%d %H:%M:%S"}}
				</h4>

					<h5>
						配送情報
					</h5>
					<table class="formTable" id="t5">
						<tbody>
							<tr>
								<th>配送日</th>
								<td><input class="text_date" style="width:120px" chk="date" name="{{$orderindex.order_id}}_sent_datetime" type="text" value="{{$orderindex.sent_datetime|date_format:"%Y/%m/%d"}}"></td>
							</tr>
							<tr>
								<th>配送会社</th>
								<td >
                                <select name="{{$orderindex.order_id}}_delivery_company">
                                {{foreach name=goodloop from=$order_buy item=i}}
                         
                                <option value="{{$i.content}}" {{if $orderindex.delivery_company eq $i.content}}selected{{/if}}>{{$i.content}}</option>
                                {{/foreach}}
                                </select>
                                </td>
							</tr>
							<tr>
								<th>伝票番号</th>
								<td><input name="{{$orderindex.order_id}}_delivery_number" type="text" value="{{$orderindex.delivery_number}}"></td>
							</tr>
							<tr>
								<th>コメント</th>
								<td><input name="{{$orderindex.order_id}}_delivery_app" type="text" value="{{$orderindex.delivery_app}}"></td>
							</tr>
                            <tr>
                                <th>発送完了メール</th>
                                <td><input name="{{$orderindex.order_id}}_sendmail" type="radio" value="1" id="r1" checked><label for="r1">送信する</label>
                                <input name="{{$orderindex.order_id}}_sendmail" type="radio" value="0"  id="r2"><label for="r2">送信しない</label></td>
                            </tr>
						</tbody>
					</table>
                    {{/foreach}}
				<p class="button">
					<button type="button" id="btn_update" class="submit"><span>更新</span></button>
				</p>
               
			</form>
		</section>
	</article>
    </div>
    <footer id="dashboard_footer">Copyright (C) SHIFT. / All rights reserved.</footer>
</body>
</html>
